package com.mgrid.convert.mysql.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * DCIM 虚拟历史数据表
 * @TableName historysignal
 */
@TableName(value ="historysignal")
@Data
public class SHistorysignal implements Serializable {
    /**
     *
     */
    @TableId
    private String id;

    /**
     *
     */
    private Integer roomid;

    /**
     *
     */
    private String roomname;

    /**
     *
     */
    private Integer samplerid;

    /**
     *
     */
    private String samplername;

    /**
     *
     */
    private Integer equipmentid;

    /**
     *
     */
    private String equipmentname;

    /**
     *
     */
    private Integer signalid;

    /**
     *
     */
    private String signalname;

    /**
     *
     */
    private Date recordtime;

    /**
     *
     */
    private Double floatvalue;

    /**
     *
     */
    private String stringvalue;

    /**
     *
     */
    private String meanings;

    /**
     *
     */
    private String stationname;

    /**
     *
     */
    private Integer stationid;

    /**
     *
     */
    private String unit;

    /**
     *
     */
    private Integer uniquid;

    /**
     *
     */
    private Integer recordtimetomin;

    /**
     *
     */
    private Date recordtimeinorder;

    /**
     *
     */
    private String esname;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SHistorysignal other = (SHistorysignal) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRoomid() == null ? other.getRoomid() == null : this.getRoomid().equals(other.getRoomid()))
            && (this.getRoomname() == null ? other.getRoomname() == null : this.getRoomname().equals(other.getRoomname()))
            && (this.getSamplerid() == null ? other.getSamplerid() == null : this.getSamplerid().equals(other.getSamplerid()))
            && (this.getSamplername() == null ? other.getSamplername() == null : this.getSamplername().equals(other.getSamplername()))
            && (this.getEquipmentid() == null ? other.getEquipmentid() == null : this.getEquipmentid().equals(other.getEquipmentid()))
            && (this.getEquipmentname() == null ? other.getEquipmentname() == null : this.getEquipmentname().equals(other.getEquipmentname()))
            && (this.getSignalid() == null ? other.getSignalid() == null : this.getSignalid().equals(other.getSignalid()))
            && (this.getSignalname() == null ? other.getSignalname() == null : this.getSignalname().equals(other.getSignalname()))
            && (this.getRecordtime() == null ? other.getRecordtime() == null : this.getRecordtime().equals(other.getRecordtime()))
            && (this.getFloatvalue() == null ? other.getFloatvalue() == null : this.getFloatvalue().equals(other.getFloatvalue()))
            && (this.getStringvalue() == null ? other.getStringvalue() == null : this.getStringvalue().equals(other.getStringvalue()))
            && (this.getMeanings() == null ? other.getMeanings() == null : this.getMeanings().equals(other.getMeanings()))
            && (this.getStationname() == null ? other.getStationname() == null : this.getStationname().equals(other.getStationname()))
            && (this.getStationid() == null ? other.getStationid() == null : this.getStationid().equals(other.getStationid()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getUniquid() == null ? other.getUniquid() == null : this.getUniquid().equals(other.getUniquid()))
            && (this.getRecordtimetomin() == null ? other.getRecordtimetomin() == null : this.getRecordtimetomin().equals(other.getRecordtimetomin()))
            && (this.getRecordtimeinorder() == null ? other.getRecordtimeinorder() == null : this.getRecordtimeinorder().equals(other.getRecordtimeinorder()))
            && (this.getEsname() == null ? other.getEsname() == null : this.getEsname().equals(other.getEsname()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRoomid() == null) ? 0 : getRoomid().hashCode());
        result = prime * result + ((getRoomname() == null) ? 0 : getRoomname().hashCode());
        result = prime * result + ((getSamplerid() == null) ? 0 : getSamplerid().hashCode());
        result = prime * result + ((getSamplername() == null) ? 0 : getSamplername().hashCode());
        result = prime * result + ((getEquipmentid() == null) ? 0 : getEquipmentid().hashCode());
        result = prime * result + ((getEquipmentname() == null) ? 0 : getEquipmentname().hashCode());
        result = prime * result + ((getSignalid() == null) ? 0 : getSignalid().hashCode());
        result = prime * result + ((getSignalname() == null) ? 0 : getSignalname().hashCode());
        result = prime * result + ((getRecordtime() == null) ? 0 : getRecordtime().hashCode());
        result = prime * result + ((getFloatvalue() == null) ? 0 : getFloatvalue().hashCode());
        result = prime * result + ((getStringvalue() == null) ? 0 : getStringvalue().hashCode());
        result = prime * result + ((getMeanings() == null) ? 0 : getMeanings().hashCode());
        result = prime * result + ((getStationname() == null) ? 0 : getStationname().hashCode());
        result = prime * result + ((getStationid() == null) ? 0 : getStationid().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getUniquid() == null) ? 0 : getUniquid().hashCode());
        result = prime * result + ((getRecordtimetomin() == null) ? 0 : getRecordtimetomin().hashCode());
        result = prime * result + ((getRecordtimeinorder() == null) ? 0 : getRecordtimeinorder().hashCode());
        result = prime * result + ((getEsname() == null) ? 0 : getEsname().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", roomid=").append(roomid);
        sb.append(", roomname=").append(roomname);
        sb.append(", samplerid=").append(samplerid);
        sb.append(", samplername=").append(samplername);
        sb.append(", equipmentid=").append(equipmentid);
        sb.append(", equipmentname=").append(equipmentname);
        sb.append(", signalid=").append(signalid);
        sb.append(", signalname=").append(signalname);
        sb.append(", recordtime=").append(recordtime);
        sb.append(", floatvalue=").append(floatvalue);
        sb.append(", stringvalue=").append(stringvalue);
        sb.append(", meanings=").append(meanings);
        sb.append(", stationname=").append(stationname);
        sb.append(", stationid=").append(stationid);
        sb.append(", unit=").append(unit);
        sb.append(", uniquid=").append(uniquid);
        sb.append(", recordtimetomin=").append(recordtimetomin);
        sb.append(", recordtimeinorder=").append(recordtimeinorder);
        sb.append(", esname=").append(esname);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}